package com.homedo.odin.solution.dao;

import com.homedo.core.common.base.dao.BaseDao;
import com.homedo.odin.solution.model.dto.SensitiveWord;
import com.homedo.odin.solution.model.entity.DictData;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * <p> 字典数据 Mapper 接口 </p>
 *
 * @author HarveyDing
 * @since 2018-03-08
 */
public interface DictDataMapper extends BaseDao<DictData> {

    List<String> findValueListByType(@Param("type") String type);

    Integer updateValueByUserIdAndType(@Param("userId") Long userId, @Param("original") String original,
            @Param("target") String target, @Param("type") String type, @Param("userName") String userName);

    Integer updateStatusByValueAndType(@Param("value") String value, @Param("userId") Long userId,
            @Param("type") String type, @Param("status") int status, @Param("userName") String userName);

    List<SensitiveWord> findSensitiveWord(@Param("type") String type, @Param("value") String value);

    DictData getDictDataByTypeAndKey(@Param("type") String type, @Param("key") String key);

    DictData getDictDataById(Integer id);
}